﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrdenAnticipoListGrid.ascx.cs"
 Inherits="UILGestion.Control.OrdenAnticipoListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>

<asp:UpdatePanel ID="ordenAnticipoListUP" runat="server" UpdateMode="Conditional">
<ContentTemplate>


<asp:DataPager ID="pager" PagedControlID="ComparativoListView" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ComparativoListView" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer"   border="0"   runat="server"  >
            
            <tr id="Tr1" runat="server" class="ms-crm-List-Header" >
            
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort"  runat="server"></asp:LinkButton>
                </th>
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="fecha" runat="server">Fecha</asp:LinkButton>
                    </th>
                <th id="Th3" runat="server" align="right" >
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="descripcion" runat="server">Descripcion</asp:LinkButton>
                </th>
                
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton4"  CommandName="Sort" CommandArgument="porcentaje" runat="server">Porcentaje</asp:LinkButton>
                </th>
                <th id="Th1" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton1"  CommandName="Sort" CommandArgument="total" runat="server">Sub Total</asp:LinkButton>
                </th>
                <th id="Th2" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton3"  CommandName="Sort" CommandArgument="total" runat="server">IGV</asp:LinkButton>
                </th>
                <th id="Th5" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton6"  CommandName="Sort" CommandArgument="total" runat="server">Total</asp:LinkButton>
                </th>
             
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr  style='border-color:Silver;background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
        
         <td width="75px">
             <asp:Hyperlink runat= "server" ForeColor="Blue"
                Text="Imprimir"
                 Target="_blank"  
                 ID="Hyperlink1"
                NavigateUrl='<%# "~/rpt/PrintForm.aspx?type=OC&idOrdenCompra=" + DataBinder.Eval (Container.DataItem,"idOrden").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()+
                 "&idAnticipo=" + DataBinder.Eval(Container.DataItem,"idInternal").ToString()
                 %>' 
                 
                  
               />  
            </td>
            <td  width="100px">
                <%# Eval("fechaStr")%><br />
            </td>
            <td  align="left"  width="450px">
            Base:<%# Eval("descripcion")%><br />
             </td>
             <td Width="150px" align="right">
                <%# Eval("Porcentaje")%>
            </td>

           <td align="right" width="100px">
                          
           <%# Eval("subTotalStr")%><br />
            </td>

            <td align="right" width="100px">
                          
           <%# Eval("IGVStr")%><br />
            </td>

            <td align="right" width="100px">
                          
           <%# Eval("totalStr")%><br />
            </td>
           
            
        <td>
          <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
             CommandArgument='<%# Eval("idInternal")%>' ImageUrl="~/Images/delete.gif" 
             OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" />
                  
        </td>
        
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                     <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>




    
     